<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>修改模型</title>
<link href="__ADMIN_PUBLIC__css/style.css" rel="stylesheet" type="text/css" />
<link href="__ADMIN_PUBLIC__css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__ADMIN_PUBLIC__js/jquery.js"></script>
<script type="text/javascript" src="__ADMIN_PUBLIC__js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="__ADMIN_PUBLIC__js/select-ui.min.js"></script>
<script type="text/javascript" src="__ADMIN_PUBLIC__editor/kindeditor.js"></script>

<script type="text/javascript">
    KE.show({
        id : 'content7',
        cssPath : './index.css'
    });
  </script>
  
<script type="text/javascript">
$(document).ready(function(e) {
    $(".select1").uedSelect({
		width : 345			  
	});
	$(".select2").uedSelect({
		width : 167  
	});
	$(".select3").uedSelect({
		width : 100
	});
});
</script>
</head>

<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
     <li><a href="{:U('Admin/Index/welcome/')}">首页</a></li>
    <li><a href="{:U('Admin/ContentModel/index/')}">模型管理</a></li>
    <li><a href="{:U('Admin/ContentModel/editModel/')}">修改模型</a></li>
    </ul>
    </div>
    
    <div class="formbody">   
    
    <div id="usual1" class="usual"> 
        <div class="tools">
    
        <ul class="toolbar">
        <li class="click"><a href="{:U('Admin/ContentModel/add')}"><span><img src="__ADMIN_PUBLIC__images/t01.png" /></span>添加模型</a></li>
        <li class="click"><a href="{:U('Admin/ContentModel/addField')}?mname={$modelData.mmodel_name}"><span><img src="__ADMIN_PUBLIC__images/t01.png" /></span>添加字段</a></li>
        </ul>
        
        
        <ul class="toolbar1">       
        </ul>
    
    </div>
    <div class="itab">
  	<ul> 
    <li><a href="#tab1" class="selected">模型设置</a></li>
    <li><a href="#tab2" class="">字段管理</a></li>
  	</ul>
    </div> 
    <form action="" method="post">
  	<div id="tab1" class="tabson">    
    <ul class="forminfo">
    <li><label>模型名称<b>*</b></label><input name="mname" type="text" class="dfinput" value="{$modelData.mname}"  />（中文名称）</li>
   
    <li><label>模型表名<b>*</b></label><div class="dfinputradio">{$modelData.mmodel_name}</div>  
    </li>

     <li><label>模型标示名<b>*</b></label> <div class="dfinputradio">{$modelData.mfield}</div>    
    </li>


    
    <li><label>模型性质<b>*</b></label>
    
    <div class="vocation">
    <select class="select1" name="mtype">
   
    <option value="1"  <if condition="$modelData.mtype eq 1">selected="selected"</if> >独立模型</option>

    <option value="0" <if condition="$modelData.mtype eq 0">selected="selected"</if> >系统模型(创建后不能删除)</option>

    </select>
    </div>

     <li><label>发布程序<b>*</b></label> <input name="mpost" type="text" class="dfinput" value="{$modelData.mpost}"  />  
    </li>

     <li><label>修改程序<b>*</b></label> <input name="medit" type="text" class="dfinput" value="{$modelData.medit}"  />   
    </li>

     <li><label>管理程序<b>*</b></label> <input name="madmin" type="text" class="dfinput" value="{$modelData.madmin}"  /> 
    </li>
    
    </li>
    <li><label>&nbsp;</label><input name="" type="submit" class="btn" value="更新模型"/></li>
    </ul>
    
    </div> 
    <div id="tab2" class="tabson">
    
    
    <ul class="forminfo">
       <table class="tablelist">
      <thead>
      <tr>
        <th>提示名称</th>
        <th>字段名</th>
        <th>字段类型</th>
        <th>表单类型</th>
        <th>操作</th>
        </tr>
        </thead>
        <tbody>

       
        <foreach name="modelField" item="v" >
         <if condition="$v['fieldName']">
        <tr>
        <td>{$v.fieldName}</td>
        <td>{$v.field}</td>
        <td>{$v.type}</td>
        <td>{$v.Fword}</td>
        <td>
            <if condition="$modelData.mtype eq 1">
                <a href="{:U('editField/')}?mname={$modelData.mmodel_name}&field={$v.field}" class="tablelink">修改字段</a>
           <else />
               系统模型禁止修改
            </if>
       
        </tr> 
        </if>
        </foreach>

       
        
        </tbody>
    </table>
    </ul>
    </div>



    </form>
    
    
  	
	<script type="text/javascript"> 
      $("#usual1 ul").idTabs(); 
    </script>
    
    <script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	</script>
    
    
    
    
    
    </div>


</body>

</html>
